// combineReducers 该方法是用来将多个 reducer 合并成一个
import { legacy_createStore as createStore, combineReducers } from 'redux'

import app from './modules/app'

import pro from './modules/pro'

// 一般情况下我们会将相同类型的状态放在一个独立的模块中

// 如果有多个 reducer，我们要考虑如何将这些 reducer 合并成一个

// 将多个 reducer 合并为一个
const reducer = combineReducers({
    app: app,
    pro
})

const store = createStore(reducer)


export default store